<template>
  <div>
    购物
    <BottomBar />
  </div>
</template>

<script>
export default {
  beforeRouteEnter(to, from, next) {
    console.log(to);
    console.log(from);
    next();
  },
  beforeRouteLeave(to, from, next) {
    console.log(to);
    console.log(from);

    if(confirm("你确定离开吗？")){
         next();
    }else{
      window.location.href="/shop"
    }

    
  },
};
</script>

<style>
</style>